package com.roocon.design_pattern.chapter08_active_object;

public class BuildHouseTask extends Task {

  private final int count;
  private final char fillChar;

  public BuildHouseTask(Worker worker, FutureResult result, int count, char fillChar) {
    super(worker, result);
    this.count = count;
    this.fillChar = fillChar;
  }

  @Override public void execute() {
    Result result = worker.doWorkForResult(count, fillChar);
    futureResult.setResult(result);
  }
}
